package {file-package};

import {dao-package}.{entity-name}Dao;
import {entity-package}.{entity-name}{entity-suffix};
import {po-package}.{entity-name}PO;
import {mapper-package}.{entity-name}Mapper;
import {assembler-package}.{module-class-name}Assembler;

import {dao-resource};
import org.springframework.stereotype.Component;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * {description}
 *
 * @author {author}
 * @date {date}
 */
@Component
public class {entity-name}DaoImpl
        extends ServiceImpl<{entity-name}Mapper, {entity-name}PO>
        implements {entity-name}Dao {
    @Resource
    private {module-class-name}Assembler {module-class-name-field}Assembler;

    @Override
    public void add({entity-name}{entity-suffix} item) {
        super.save({module-class-name-field}Assembler.from{entity-name}(item));
    }

    @Override
    public void update({entity-name}{entity-suffix} item) {
        super.updateById({module-class-name-field}Assembler.from{entity-name}(item));
    }

}
